# !/usr/bin/python3
# _*_ coding: utf-8 _*_
# @Time     : 2022/4/25 上午8:46
# @Author   : HHR
# ___MSG___ : "创建议题会议目录"
import os, time, xlrd
from openpyxl import Workbook
from openpyxl.styles import Alignment, Font
from administrative.models import Topics
from administrative.utils import send_mssage
from openpyxl.styles.borders import Border, Side
from xlutils.copy import copy


class create_table():
    def __init__(self):
        pass

    def yb_excel(self, insert_data, excel_name, excel_title):
        wb = Workbook()
        ws = wb['Sheet']
        ws.title = 'Sheet1'
        ws.merge_cells('A1:I1')
        ws.row_dimensions[1].height = 31
        top_left_cell = ws['A1']
        top_left_cell.value = f"{excel_title}"
        top_left_cell.font = Font(b=True, color="000000", size=16)
        top_left_cell.alignment = Alignment(horizontal="center", vertical="center")

        line_list = ["A2", "B2", "C2", "D2", "E2", "F2", "G2", "H2", "I2"]
        ws['A2'] = '序号'
        ws['B2'] = '议题名称'
        ws['C2'] = '议题类型'
        ws['D2'] = '提交科室'
        ws['E2'] = '提交人'
        ws['F2'] = '提交时间'
        ws['G2'] = '审核时间'
        ws['H2'] = '汇报人'
        ws['I2'] = '页码'
        ws.row_dimensions[2].height = 31
        for line in line_list:
            top_left_cell = ws[line]
            top_left_cell.font = Font(b=True, color="000000", size=14)
            top_left_cell.alignment = Alignment(horizontal="center", vertical="center")
        row = 3
        serial = 1
        for x in insert_data:
            ws[f'A{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'B{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'C{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'D{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'E{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'F{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'G{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'H{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'I{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws.cell(row, 1).value = x[0]
            ws.cell(row, 2).value = x[1]
            ws.cell(row, 3).value = x[8]
            ws.cell(row, 4).value = x[2]
            ws.cell(row, 5).value = x[3]
            ws.cell(row, 6).value = x[4]
            ws.cell(row, 7).value = x[5]
            ws.cell(row, 8).value = x[6]
            try:
                ws.cell(row, 9).value = x[9]
            except:
                ws.cell(row, 9).value = ""
            ws.row_dimensions[row].height = 31
            row += 1
        ws.column_dimensions['A'].width = 10
        ws.column_dimensions['B'].width = 40
        ws.column_dimensions['c'].width = 20
        ws.column_dimensions['D'].width = 20
        ws.column_dimensions['E'].width = 20
        ws.column_dimensions['F'].width = 20
        ws.column_dimensions['G'].width = 20
        ws.column_dimensions['H'].width = 20
        ws.column_dimensions['I'].width = 20
        wb.save(excel_name)

    def yb_excel1(self, insert_data, excel_name, excel_title):
        wb = Workbook()
        ws = wb['Sheet']
        ws.title = 'Sheet1'
        ws.merge_cells('A1:H1')
        ws.row_dimensions[1].height = 31
        top_left_cell = ws['A1']
        top_left_cell.value = f"{excel_title}"
        top_left_cell.font = Font(b=True, color="000000", size=16)
        top_left_cell.alignment = Alignment(horizontal="center", vertical="center")

        line_list = ["A2", "B2", "C2", "D2", "E2", "F2", "G2"]
        ws['A2'] = '序号'
        ws['B2'] = '议题名称'
        ws['C2'] = '提交科室'
        ws['D2'] = '提交人'
        ws['E2'] = '提交时间'
        ws['F2'] = '审核时间'
        ws['G2'] = '汇报人'
        ws.row_dimensions[2].height = 31
        for line in line_list:
            top_left_cell = ws[line]
            top_left_cell.font = Font(b=True, color="000000", size=14)
            top_left_cell.alignment = Alignment(horizontal="center", vertical="center")
        row = 3
        serial = 1
        for x in insert_data:
            ws[f'A{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'B{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'C{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'D{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'E{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'F{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'G{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws.cell(row, 1).value = x[0]
            ws.cell(row, 2).value = x[1]
            ws.cell(row, 3).value = x[2]
            ws.cell(row, 4).value = x[3]
            ws.cell(row, 5).value = x[4]
            ws.cell(row, 6).value = x[5]
            ws.cell(row, 7).value = x[6]
            ws.row_dimensions[row].height = 31
            row += 1
        ws.column_dimensions['A'].width = 10
        ws.column_dimensions['B'].width = 40
        ws.column_dimensions['c'].width = 20
        ws.column_dimensions['D'].width = 20
        ws.column_dimensions['E'].width = 20
        ws.column_dimensions['F'].width = 20
        ws.column_dimensions['G'].width = 20
        wb.save(excel_name)

    def db_excel(self, yb_insert_data, db_insert_data, excel_name, excel_title):
        row = 4
        wb = Workbook()
        ws = wb['Sheet']
        ws.title = 'Sheet1'
        ws.merge_cells('A1:H1')
        ws.row_dimensions[1].height = 31
        top_left_cell = ws['A1']
        top_left_cell.value = f"{excel_title}"
        top_left_cell.font = Font(b=True, color="000000", size=16)
        top_left_cell.alignment = Alignment(horizontal="center", vertical="center")

        if yb_insert_data:
            ws.merge_cells('A2:H2')
            ws.row_dimensions[2].height = 31
            top_left_cell1 = ws['A2']
            top_left_cell1.value = "办公会提交党委会议审议议题             汇报人：党委办公室主任"
            top_left_cell1.font = Font(b=True, color="000000", size=14)
            top_left_cell1.alignment = Alignment(horizontal="center", vertical="center")
            line_list = ["A3", "B3", "H3"]
            ws.merge_cells('B3:G3')
            ws['A3'] = '序号'
            ws['B3'] = '议题名称'
            ws['H3'] = '页码'

            for line in line_list:
                top_left_cell = ws[line]
                top_left_cell.font = Font(b=True, color="000000", size=14)
                top_left_cell.alignment = Alignment(horizontal="center", vertical="center")

            for x in yb_insert_data:
                ws.merge_cells(f'B{row}:G{row}')
                ws[f'A{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'B{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'H{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws.cell(row, 1).value = x[0]
                ws.cell(row, 2).value = x[1]
                ws.cell(row, 8).value = x[3]
                ws.row_dimensions[row].height = 31
                row += 1
            ws.column_dimensions['A'].width = 10
            wb.save(excel_name)

        if db_insert_data:
            ws.merge_cells(f'A{row}:H{row}')
            top_left_cell3 = ws[f'A{row}']
            ws.row_dimensions[row].height = 31
            top_left_cell3.value = "党委会议题"
            top_left_cell3.font = Font(b=True, color="000000", size=14)
            top_left_cell3.alignment = Alignment(horizontal="center", vertical="center")
            row = row + 1
            line_list = [f"A{row}", f"B{row}", f"C{row}", f"D{row}", f"E{row}", f"F{row}", f"G{row}", f"H{row}"]
            ws[f'A{row}'] = '序号'
            ws[f'B{row}'] = '议题名称'
            ws[f'C{row}'] = '提交科室'
            ws[f'D{row}'] = '提交人'
            ws[f'E{row}'] = '提交时间'
            ws[f'F{row}'] = '审核时间'
            ws[f'G{row}'] = '汇报人'
            ws[f'H{row}'] = '页码'
            ws.row_dimensions[row].height = 31

            for line in line_list:
                top_left_cell = ws[line]
                top_left_cell.font = Font(b=True, color="000000", size=14)
                top_left_cell.alignment = Alignment(horizontal="center", vertical="center")

            row = row + 1
            for x in db_insert_data:
                ws[f'A{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'B{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'C{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'D{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'E{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'F{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'G{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws[f'H{row}'].alignment = Alignment(horizontal="center", vertical="center")
                ws.cell(row, 1).value = x[0]
                ws.cell(row, 2).value = x[1]
                ws.cell(row, 3).value = x[2]
                ws.cell(row, 4).value = x[3]
                ws.cell(row, 5).value = x[4]
                ws.cell(row, 6).value = x[5]
                ws.cell(row, 7).value = x[6]
                ws.cell(row, 8).value = x[8]
                ws.row_dimensions[row].height = 31
                row += 1
            ws.column_dimensions['A'].width = 10
            ws.column_dimensions['B'].width = 40
            ws.column_dimensions['c'].width = 20
            ws.column_dimensions['D'].width = 20
            ws.column_dimensions['E'].width = 20
            ws.column_dimensions['F'].width = 20
            ws.column_dimensions['G'].width = 20
            ws.column_dimensions['H'].width = 20
            wb.save(excel_name)

    def send_msg(self, data_list, file_name, meeting_time, meeting_adress, ty=None):
        ld_name = ""
        SerialNo = []
        all_list = []
        for i in data_list:
            if i[3] == ld_name:
                SerialNo[0].append(i[0])
            else:
                if SerialNo:
                    all_list.append(SerialNo)
                SerialNo = []
                SerialNo.append([i[0]])
                SerialNo.append(i[-2])
                ld_name = i[3]
        all_list.append(SerialNo)
        for j in all_list:
            try:
                mobile_list = []
                if len(j[0]) > 1:
                    serial_range = str(j[0][0]) + "至" + str(j[0][-1])
                else:
                    serial_range = str(j[0][0])

                Topics_obj = Topics.objects.get(id=j[1])
                mobile_list.append(Topics_obj.employee.mobile)

                serial_content = f'您好！{file_name} 将于 {str(meeting_time).split(".")[0][:-3]} 在 {meeting_adress} 召开, 您提交的议题位于第{serial_range}个，请准时参加！'
                if ty:
                    serial_content = f'您好！{file_name} 将于 {str(meeting_time).split(".")[0][:-3]} 在 {meeting_adress} 召开, 您提交的议题位于党委会议题的第{serial_range}个，请准时参加！'
                res = send_mssage(mobile_list, serial_content)
            except Exception as E:
                print("E: ", E)
                continue

    def excel_append(self, insert_data, excel_name, excel_title):
        wb = Workbook()
        ws = wb['Sheet']
        ws.title = 'Sheet1'
        ws.merge_cells('A1:H1')
        ws.row_dimensions[1].height = 31
        top_left_cell = ws['A1']
        top_left_cell.value = f"{excel_title}"
        top_left_cell.font = Font(b=True, color="000000", size=16)
        top_left_cell.alignment = Alignment(horizontal="center", vertical="center")

        line_list = ["A2", "B2", "C2", "D2", "E2", "F2", "G2", "H2"]
        ws['A2'] = '序号'
        ws['B2'] = '议题名称'
        ws['C2'] = '提交科室'
        ws['D2'] = '提交人'
        ws['E2'] = '提交时间'
        ws['F2'] = '审核时间'
        ws['G2'] = '汇报人'
        ws['H2'] = '页码'
        ws.row_dimensions[2].height = 31
        for line in line_list:
            top_left_cell = ws[line]
            top_left_cell.font = Font(b=True, color="000000", size=14)
            top_left_cell.alignment = Alignment(horizontal="center", vertical="center")
        row = 3
        serial = 1
        for x in insert_data:
            ws[f'A{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'B{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'C{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'D{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'E{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'F{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'G{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws[f'H{row}'].alignment = Alignment(horizontal="center", vertical="center")
            ws.cell(row, 1).value = serial
            ws.cell(row, 2).value = x[1]
            ws.cell(row, 3).value = x[2]
            ws.cell(row, 4).value = x[3]
            ws.cell(row, 5).value = x[4]
            ws.cell(row, 6).value = x[5]
            ws.cell(row, 7).value = x[6]
            ws.cell(row, 8).value = x[7]
            ws.row_dimensions[row].height = 31
            row += 1
            serial += 1
        ws.column_dimensions['A'].width = 10
        ws.column_dimensions['B'].width = 40
        ws.column_dimensions['c'].width = 20
        ws.column_dimensions['D'].width = 20
        ws.column_dimensions['E'].width = 20
        ws.column_dimensions['F'].width = 20
        ws.column_dimensions['G'].width = 20
        ws.column_dimensions['H'].width = 20
        wb.save(excel_name)



class attendance_sheet():
    def create_excel(self, datas, title):
        wb = Workbook()
        ws = wb['Sheet']
        xw = wb.active
        thick_side = Side(border_style="thin", color="000000")
        border = Border(top=thick_side, left=thick_side, right=thick_side, bottom=thick_side)
        ws.title = 'Sheet1'
        ws.merge_cells('A1:w1')
        ws.row_dimensions[1].height = 31
        top_left_cell = ws['A1']
        top_left_cell.value = f"{title}"
        top_left_cell.font = Font(b=True, color="000000", size=16)
        top_left_cell.alignment = Alignment(horizontal="center", vertical="center")
        now_time = time.strftime("%Y.%m.%d", time.localtime())
        ws.merge_cells('A2:w2')
        ws.row_dimensions[1].height = 25
        top_left_cell = ws['A2']
        top_left_cell.value = f"时间：{now_time}"
        top_left_cell.font = Font(b=True, size=10)
        top_left_cell.alignment = Alignment(horizontal="right", vertical="center")
        ws.row_dimensions[2].height = 25

        ws.merge_cells('A3:A4')
        ws.merge_cells('B3:B4')
        ws.merge_cells('C3:C4')
        ws.merge_cells('D3:D4')
        ws.merge_cells('E3:E4')
        ws.merge_cells('F3:F4')
        ws.merge_cells('G3:V3')
        ws.merge_cells('W3:W4')
        ws.row_dimensions[2].height = 25
        three_row = ws['G3']
        three_row.value = "考      勤      动      态"
        three_row.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
        WRow = ws['W3']
        WRow.value = "备  注"
        ws.column_dimensions['w'].width = 25
        ws.column_dimensions['B'].width = 20
        ws.column_dimensions['F'].width = 15
        WRow.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
        ws['A3'] = '序号'
        ws['A3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['B3'] = '科室'
        ws['B3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['C3'] = '工号'
        ws['C3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['D3'] = '执业'
        ws['D3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['E3'] = '姓名'
        ws['E3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['F3'] = '实际出勤天数'
        ws['F3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['G4'] = '上班'
        ws['G4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['H4'] = '援荆'
        ws['H4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['I4'] = '隔离'
        ws['I4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['J4'] = '外差'
        ws['J4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['K4'] = '进修'
        ws['K4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['L4'] = '计生假'
        ws['L4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['M4'] = '产假'
        ws['M4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['N4'] = '年休假'
        ws['N4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['O4'] = '事假'
        ws['O4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['P4'] = '病假'
        ws['P4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['Q4'] = '工伤'
        ws['Q4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['R4'] = '探亲'
        ws['R4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['S4'] = '婚假'
        ws['S4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['T4'] = '丧假'
        ws['T4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['U4'] = '放射假'
        ws['U4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['V4'] = '育儿假'
        ws['V4'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws['W3'] = '备  注'
        ws['W3'].alignment = Alignment(horizontal='center', vertical='center', wrap_text=True)
        ws.row_dimensions[3].height = 25
        ws.row_dimensions[4].height = 25

        line_list = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W"]
        for j in range(1, 5):
            for k in line_list:
                xw[f'{k}{j}'].border = border

        row = 5
        for x in datas:
            ws[f'A{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'A{row}'].border = border
            ws[f'B{row}'].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
            xw[f'B{row}'].border = border
            ws[f'C{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'C{row}'].border = border
            ws[f'D{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'D{row}'].border = border
            ws[f'E{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'E{row}'].border = border
            ws[f'F{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'F{row}'].border = border
            ws[f'G{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'G{row}'].border = border
            ws[f'H{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'H{row}'].border = border
            ws[f'I{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'I{row}'].border = border
            ws[f'J{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'J{row}'].border = border
            ws[f'K{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'K{row}'].border = border
            ws[f'L{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'L{row}'].border = border
            ws[f'M{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'M{row}'].border = border
            ws[f'N{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'N{row}'].border = border
            ws[f'O{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'O{row}'].border = border
            ws[f'P{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'P{row}'].border = border
            ws[f'Q{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'Q{row}'].border = border
            ws[f'R{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'R{row}'].border = border
            ws[f'S{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'S{row}'].border = border
            ws[f'T{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'T{row}'].border = border
            ws[f'U{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'U{row}'].border = border
            ws[f'V{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'V{row}'].border = border
            ws[f'W{row}'].alignment = Alignment(horizontal="center", vertical="center")
            xw[f'W{row}'].border = border
            ws.cell(row, 1).value = x[0]
            ws.cell(row, 2).value = x[1]
            ws.cell(row, 3).value = x[2]
            ws.cell(row, 4).value = x[3]
            ws.cell(row, 5).value = x[4]
            ws.cell(row, 6).value = x[5]
            ws.cell(row, 7).value = x[6]
            ws.cell(row, 8).value = x[8]
            ws.cell(row, 9).value = x[8]
            ws.cell(row, 10).value = x[9]
            ws.cell(row, 11).value = x[10]
            ws.cell(row, 12).value = x[11]
            ws.cell(row, 13).value = x[12]
            ws.cell(row, 14).value = x[13]
            ws.cell(row, 15).value = x[14]
            ws.cell(row, 16).value = x[15]
            ws.cell(row, 17).value = x[16]
            ws.cell(row, 18).value = x[17]
            ws.cell(row, 19).value = x[18]
            ws.cell(row, 20).value = x[19]
            ws.cell(row, 21).value = x[20]
            ws.cell(row, 22).value = x[21]
            ws.cell(row, 23).value = x[22]
            ws.row_dimensions[row].height = 25
            row += 1

        file_path = os.getcwd() + f"/media/check_attendance/AttendanceSummary.xlsx"
        if os.path.exists(file_path):
            os.remove(file_path)
        wb.save(file_path)
        return file_path

    def dispatch_excel(self, datas, title):
        original_file = os.getcwd() + "\static\personnel\excel_model\劳务派遣人员考勤及月度考核.xls"
        rb = xlrd.open_workbook(original_file, formatting_info=True)
        sheet = rb.sheet_by_index(0)
        nows = sheet.nrows
        wb = copy(rb)
        w_sheet = wb.get_sheet(0)
        nows = 3
        for x in datas:
            for j in range(len(x)):
                w_sheet.write(nows, j, x[j])  # the last step saving the work book
            nows += 1

        save_file_path = os.getcwd() + "\static\personnel\excel_model\monthly_assessment_of_labor_dispatch.xls"
        if os.path.exists(save_file_path):
            os.remove(save_file_path)
        wb.save(save_file_path)
        return save_file_path




if __name__ == '__main__':
    # yb_insert_data = [["1", "测试议题名称"],
    #                   ["2", "测试议题名称"],
    #                   ["3", "测试议题名称"]]
    # db_insert_data = [["1", "测试议题名称", "测试科室", "测试提交人", "测试创建时间", "测试适合时间", "黄浩然"], ["2", "测试议题名称", "测试科室", "测试提交人", "测试创建时间", "测试适合时间", "黄浩然"], ["3", "测试议题名称", "测试科室", "测试提交人", "测试创建时间", "测试适合时间", "黄浩然"]]
    attendance_sheet().create_excel([], "aaaaaaaaaaaaaaaaaaaaaa")
